<!-- /* Description for file.
 *客户管理添加
 *
 * @copyright     Copyright 2008-2010, PHInfo Services Inc. (http://www.phinfoservices.com)
 * @package       ues
 * @subpackage    ues/app/views/companymanages
 * @since         ues
 * @version       V0.0.1
 * @modifiedby    张朋2011年0714
 * @lastmodified  张朋2011年0714
 -->
 
<!-- 当前位置-->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Customer Managements');//一级目录
										   echo '>';echo __('Customer Managements');//二级目录
										   echo '>';?>
									<?php echo $html->tag('span', __('Customer Managements Detail',true).'&nbsp;&nbsp;&nbsp;'.$thedetail['Companymanage']['name']);//当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>
<!-- 当前位置-->
</div>
<table>
	<tr>
		<td width="50"></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/initDetail/<?php echo $thedetail['Companymanage']['id']?>">基本信息</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/linkmanlist/<?php echo $thedetail['Companymanage']['id']?>">联系人</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/projectlist/<?php echo $thedetail['Companymanage']['id']?>">项目列表</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/initDetailRemark/<?php echo $thedetail['Companymanage']['id']?>">备注信息</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/contactallinfo/<?php echo $thedetail['Companymanage']['id']?>">联系日志</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/positionallinfo/<?php echo $thedetail['Companymanage']['id']?>">职位列表</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/contractmanagementlist/<?php echo $thedetail['Companymanage']['id']?>">合同管理</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/feemanageinit/<?php echo $thedetail['Companymanage']['id']?>">费用统计</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/staffallinfo/<?php echo $thedetail['Companymanage']['id']?>">企业员工</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/resumeReportAllinfo/<?php echo $thedetail['Companymanage']['id']?>">简历报告</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/appendixUpload/<?php echo $thedetail['Companymanage']['id']?>">附件列表</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/sameCompany/<?php echo $thedetail['Companymanage']['id']?>" style="color:red;">同行公司</a></td>
	</tr>
</table>
<input type="hidden" value="<?php echo $thedetail['Companymanage']['id']?>" class="theid"></input>
<!-- 公司查询 -->
<div class="tabflex">

	<fieldset><legend><?php __('同行公司');?></legend>

	<?php echo $form->create('Companymanage',array('action'=>'findCompany/','type'=> 'post','enctype'=>'multipart/form-data'));?>
		<table width="55%" cellspacing="0" cellpadding="0" border="0" style="text-align: left;font-size:12px;">
				<?php
					echo $form->hidden('id',array('value'=>$thedetail['Companymanage']['id']));
				?> 
			<tr>
				<td width="50"></td>
				<td width="100"><?php echo __('公司名称');?></td>
				<td width="200">
				<?php echo $form->input('auctioncompanyid',array('options'=>$companyList,'label'=>false,'div'=>false,'id'=>'sss','class'=>'TextBoxE1'));?>
				</td>
				<td>
					<?php echo $form->input('companyName',array('label'=>false,'div'=>false,'class'=>'TextBoxE1','value'=>$companyName));?>
				</td>
				<td>
					<?php echo $form->button('查询',array('type'=>'submit','class'=>'btn2'));?>
				</td>
			</tr>
		</table>
	<?php echo $form->end();?>	
	<?php echo $form->create('Companymanage',array('action'=>'sameCompanyAdd/','type'=> 'post','id'=>"ff2",'enctype'=>'multipart/form-data'));?>
		<table width="40%" cellspacing="0" cellpadding="0" border="0" style="text-align: left;font-size:12px;">		
			<tr>
				<?php
					echo $form->hidden('id',array('value'=>$thedetail['Companymanage']['id']));
				?> 
				<?php
					echo $form->hidden('auctioncompanyid',array('id'=>'auctioncompanyid'));
				?>
				<td>
					<input type="button" value="添加" class="btn2" id="sub"></input>
				</td>
				<td width="90%" align="left"><div class="actions"  id="notices-actions">
	<ul>
		<li style="width:100px">
			<a onclick='getDelStr()' class="btn2"><?php //echo $html->image('delete.gif', array('alt' =>  __('Delete', true),'border'=>'0','title'=> '删除','onclick'=>'getDelStr()'));?>&nbsp;删除</a>
		</li>
	</ul>
</div></td>
			</tr>
		</table>
	<?php echo $form->end();?>
	
		</fieldset>

</div>
<!-- 公司查询 -->

<div class="notice"></div>

<!-- =================================================================== -->
<?php
echo $html->css ( 'style' );
echo $html->css ( 'tab' );
echo $javascript->link ( 'jquery' );
//print_r($customertypes);
?>
<script type="text/javascript">
$(function(){
$("#sub").click(function(){
 var aa=$("#sss").val();
$("#auctioncompanyid").val(aa);
$("#ff2").submit();
 });

 });

	function getDelStr() {
		var delArr = $("#f2 :checkbox:checked");
		if(delArr.length==0)
		{
			alert("请选择你要删除的项!");
			return;
		}
		var str = "";
		for(var i=0;i<delArr.length;i++) {
			var del = delArr[i].value;
			str += del;
			str += "/";
		}
		//window.alert(str);
		$("#delStr").val(str);
		//window.alert($("#delStr").val());
		$("#f2").submit();
	}
</script>
<?php echo $form->create('Companymanage',array('action'=>'deleteSomeAuctiondrop','type'=> 'post','id'=>'f2'));?>
<?php echo $form->hidden('delStr',array('name'=>'id','id'=>'delStr'));?>

<?php
	echo $form->hidden('companymanageId',array('value'=>$thedetail['Companymanage']['id']));
?> 

<!-- 同行公司列表 -->
<div id="nav1" style="width:97%">
<table width="100%" cellpadding="0" cellspacing="0" class="tab1">
	<tr>
		<th width="70px"><?php echo __('Selected');?></th>
		<th ><?php echo __('公司名称');?></th>
		<th ><?php echo __('行业');?></th>
		<th ><?php echo __('电话');?></th>
		<th ><?php echo __('地址');?></th>
		<th colspan="2" width="80px;"><?php echo __('Operate') ?></th>
	</tr>
	<!-- Here's where we loop through our $Notes array, printing out post info --> 
	
	<?php 
	foreach ($results as $k => $datas): 
	?>
		<tr class=normal onmouseover='this.className= "over " '
			onmouseup='this.className= "over " '
			onmouseout='this.className= "normal " '>
			<td>
			<!-- 批量删除选择 -->				
			<?php echo $form->checkbox($datas['Auctiondrop']['id'], array('value' => $datas['Auctiondrop']['id']));?>
			</td>
			<td><?php echo "<a href='".ROOT_WEB_PATH."/companymanages/initDetail/".$datas['Companymanage']['id']."' style='color:blue' >".$datas['Companymanage']['name']."</a>"; ?></td>
			<td><?php echo $datas['Companymanage']['industry']; ?></td>
			<td><?php echo $datas['Companymanage']['tel']; ?></td>
			<td><?php echo $datas['Companymanage']['address']; ?></td>
			<td colspan="2">
			<?php echo $html->link( $html->image('delete.gif', array('alt' =>  __('Delete', true),'border'=>'0')), '/companymanages/deleteAuctiondrop/'.$datas['Auctiondrop']['id'].'/'.$thedetail['Companymanage']['id'], null, 
			__('Are you sure you want to delete', true) .' '. $datas['Companymanage']['name'] . '?',array('escape'=>false));  ?> 		
			</td><!--  __('delete', true) 删除、提示 -->
		</tr> 
	<?php endforeach; ?>  
</table>
</div>
<!-- //同行公司列表 -->

<?php echo $form->end();?>

<table id="flex" style="display: none"></table><br></br>